﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Framework.IOC;
using EntityFramework.Data.Core;
namespace YouTravel.DomainService
{
    /// <summary>
    /// 项目配置类
    /// </summary>
    public class Startup
    {
        /// <summary>
        /// 动态加载配置方法
        /// </summary>
        public void Configuration()
        {
            ServiceLocator.Regist(container => {
                container.RegisterType(typeof(IRepositories.Core.IUnitOfWork), typeof(Repositories.YouTravelDbContext));
                container.RegisterType(typeof(IEFRepository<>), typeof(EFRepository<>));
                
            });
        }
    }
}
